package com.example.oasystem.dao.process;

import com.example.oasystem.entity.position.AoaPosition;
import com.example.oasystem.entity.process.AoaProcessOfSun;
import com.example.oasystem.entity.process.AoaReviewedOfSun;
import com.example.oasystem.entity.status.AoaStatusList;
import com.example.oasystem.entity.user.AoaUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface AoaProcessDaoOfSun {

    List<AoaProcessOfSun> selectProcessAndTypeAndStatus(@Param("userName")String userName,@Param("baseKey") String baseKey);

    AoaProcessOfSun selectProcess(@Param("id") long id);

    AoaProcessOfSun selectUserProcess(@Param("id") long id);

    AoaPosition selectposition(@Param("positionId") long positionId);

    AoaStatusList selectStatus(@Param("statusId")long statusName);

    void updateStatus(@Param("statusId")long statusId,@Param("id")long id);

    AoaProcessOfSun selectOneProcess(@Param("userName")String userName);

    void insertReviewed(@Param("advice") String advice,@Param("proId") long proId);

    void insertProcessUser(@Param("proId") long proId,@Param("statusId") long statusId);

    void addUserReviewed(@Param("statusId")long statusId,@Param("proId")long proId,@Param("userId")long userId);

    void updateUserName(@Param("proId") long proId,@Param("userName")String userName);

    void updateReviewedStatus(@Param("proId") long proId,@Param("statusId") long statusId,@Param("userId")long userId);

    List<AoaReviewedOfSun> reviewedSize(@Param("proId")long proId,@Param("statusId")long statusId);

    void updateUserReviewed(@Param("advice")String advice,@Param("time")String time,@Param("statusId")long statusId,@Param("proId")long proId,@Param("userId")long userId);

    List<AoaReviewedOfSun> processReviewedAll(@Param("proId")long proId);


    void updateResign(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);

    void updateBursement(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);

    void updateOvertime(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);

    void updateRegular(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);

    void updateEvenction(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);

    void updateHoliday(@Param("proId") long proId,@Param("advice") String advice,@Param("num") int num);
    //    AoaProcessOfSun selectAll(@Param("name")String name,@Param("processId")long processId);
}
